3.13.17 \(\int \cos ^4(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx\) [1217]

3.13.17.1 Optimal result
3.13.17.2 Mathematica [A] (verified)
3.13.17.3 Rubi [A] (verified)
3.13.17.4 Maple [A] (verified)
3.13.17.5 Fricas [A] (verification not implemented)
3.13.17.6 Sympy [F(-1)]
3.13.17.7 Maxima [A] (verification not implemented)
3.13.17.8 Giac [A] (verification not implemented)
3.13.17.9 Mupad [B] (verification not implemented)

3.13.17.1 Optimal result

Integrand size = 27, antiderivative size = 130 \[ \int \cos ^4(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {a^2 \log (\sin (c+d x))}{d}+\frac {2 a b \sin (c+d x)}{d}-\frac {\left (2 a^2-b^2\right ) \sin ^2(c+d x)}{2 d}-\frac {4 a b \sin ^3(c+d x)}{3 d}+\frac {\left (a^2-2 b^2\right ) \sin ^4(c+d x)}{4 d}+\frac {2 a b \sin ^5(c+d x)}{5 d}+\frac {b^2 \sin ^6(c+d x)}{6 d} \]

output
a^2*ln(sin(d*x+c))/d+2*a*b*sin(d*x+c)/d-1/2*(2*a^2-b^2)*sin(d*x+c)^2/d-4/3 
*a*b*sin(d*x+c)^3/d+1/4*(a^2-2*b^2)*sin(d*x+c)^4/d+2/5*a*b*sin(d*x+c)^5/d+ 
1/6*b^2*sin(d*x+c)^6/d
 
3.13.17.2 Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.81 \[ \int \cos ^4(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {60 a^2 \log (\sin (c+d x))+120 a b \sin (c+d x)+30 \left (-2 a^2+b^2\right ) \sin ^2(c+d x)-80 a b \sin ^3(c+d x)+15 \left (a^2-2 b^2\right ) \sin ^4(c+d x)+24 a b \sin ^5(c+d x)+10 b^2 \sin ^6(c+d x)}{60 d} \]

input
Integrate[Cos[c + d*x]^4*Cot[c + d*x]*(a + b*Sin[c + d*x])^2,x]
 
output
(60*a^2*Log[Sin[c + d*x]] + 120*a*b*Sin[c + d*x] + 30*(-2*a^2 + b^2)*Sin[c 
 + d*x]^2 - 80*a*b*Sin[c + d*x]^3 + 15*(a^2 - 2*b^2)*Sin[c + d*x]^4 + 24*a 
*b*Sin[c + d*x]^5 + 10*b^2*Sin[c + d*x]^6)/(60*d)
 
3.13.17.3 Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.02, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 3316, 27, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cos ^4(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^5 (a+b \sin (c+d x))^2}{\sin (c+d x)}dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {\int \csc (c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {\csc (c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{b}d(b \sin (c+d x))}{b^4 d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {\int \left (b^5 \sin ^5(c+d x)+2 a b^4 \sin ^4(c+d x)+b^3 \left (a^2-2 b^2\right ) \sin ^3(c+d x)-4 a b^4 \sin ^2(c+d x)-b^3 \left (2 a^2-b^2\right ) \sin (c+d x)+2 a b^4+a^2 b^3 \csc (c+d x)\right )d(b \sin (c+d x))}{b^4 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^2 b^4 \log (b \sin (c+d x))+\frac {1}{4} b^4 \left (a^2-2 b^2\right ) \sin ^4(c+d x)-\frac {1}{2} b^4 \left (2 a^2-b^2\right ) \sin ^2(c+d x)+\frac {2}{5} a b^5 \sin ^5(c+d x)-\frac {4}{3} a b^5 \sin ^3(c+d x)+2 a b^5 \sin (c+d x)+\frac {1}{6} b^6 \sin ^6(c+d x)}{b^4 d}\)

input
Int[Cos[c + d*x]^4*Cot[c + d*x]*(a + b*Sin[c + d*x])^2,x]
 
output
(a^2*b^4*Log[b*Sin[c + d*x]] + 2*a*b^5*Sin[c + d*x] - (b^4*(2*a^2 - b^2)*S 
in[c + d*x]^2)/2 - (4*a*b^5*Sin[c + d*x]^3)/3 + (b^4*(a^2 - 2*b^2)*Sin[c + 
 d*x]^4)/4 + (2*a*b^5*Sin[c + d*x]^5)/5 + (b^6*Sin[c + d*x]^6)/6)/(b^4*d)
 

3.13.17.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
3.13.17.4 Maple [A] (verified)

Time = 0.56 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.62

method result size
derivativedivides \(\frac {a^{2} \left (\frac {\left (\cos ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\cos ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )+\frac {2 a b \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}-\frac {b^{2} \left (\cos ^{6}\left (d x +c \right )\right )}{6}}{d}\) \(81\)
default \(\frac {a^{2} \left (\frac {\left (\cos ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\cos ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )+\frac {2 a b \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}-\frac {b^{2} \left (\cos ^{6}\left (d x +c \right )\right )}{6}}{d}\) \(81\)
parallelrisch \(\frac {30 \cos \left (4 d x +4 c \right ) a^{2}-30 b^{2} \cos \left (4 d x +4 c \right )-5 b^{2} \cos \left (6 d x +6 c \right )+24 a b \sin \left (5 d x +5 c \right )+200 a b \sin \left (3 d x +3 c \right )+360 a^{2} \cos \left (2 d x +2 c \right )-75 b^{2} \cos \left (2 d x +2 c \right )+1200 a b \sin \left (d x +c \right )+960 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-960 a^{2} \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-390 a^{2}+110 b^{2}}{960 d}\) \(155\)
risch \(-i a^{2} x +\frac {3 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{16 d}-\frac {5 \,{\mathrm e}^{2 i \left (d x +c \right )} b^{2}}{128 d}+\frac {3 a^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{16 d}-\frac {5 \,{\mathrm e}^{-2 i \left (d x +c \right )} b^{2}}{128 d}-\frac {2 i a^{2} c}{d}+\frac {a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}+\frac {5 a b \sin \left (d x +c \right )}{4 d}-\frac {\cos \left (6 d x +6 c \right ) b^{2}}{192 d}+\frac {a b \sin \left (5 d x +5 c \right )}{40 d}+\frac {a^{2} \cos \left (4 d x +4 c \right )}{32 d}-\frac {\cos \left (4 d x +4 c \right ) b^{2}}{32 d}+\frac {5 a b \sin \left (3 d x +3 c \right )}{24 d}\) \(202\)
norman \(\frac {-\frac {12 a^{2} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {12 a^{2} \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 \left (2 a^{2}-b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 \left (2 a^{2}-b^{2}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 \left (12 a^{2}-5 b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {28 a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {104 a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}+\frac {104 a b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}+\frac {28 a b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {4 a b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}+\frac {a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a^{2} \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) \(283\)

input
int(cos(d*x+c)^5*csc(d*x+c)*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 
output
1/d*(a^2*(1/4*cos(d*x+c)^4+1/2*cos(d*x+c)^2+ln(sin(d*x+c)))+2/5*a*b*(8/3+c 
os(d*x+c)^4+4/3*cos(d*x+c)^2)*sin(d*x+c)-1/6*b^2*cos(d*x+c)^6)
 
3.13.17.5 Fricas [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.74 \[ \int \cos ^4(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {10 \, b^{2} \cos \left (d x + c\right )^{6} - 15 \, a^{2} \cos \left (d x + c\right )^{4} - 30 \, a^{2} \cos \left (d x + c\right )^{2} - 60 \, a^{2} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 8 \, {\left (3 \, a b \cos \left (d x + c\right )^{4} + 4 \, a b \cos \left (d x + c\right )^{2} + 8 \, a b\right )} \sin \left (d x + c\right )}{60 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)*(a+b*sin(d*x+c))^2,x, algorithm="fricas" 
)
 
output
-1/60*(10*b^2*cos(d*x + c)^6 - 15*a^2*cos(d*x + c)^4 - 30*a^2*cos(d*x + c) 
^2 - 60*a^2*log(1/2*sin(d*x + c)) - 8*(3*a*b*cos(d*x + c)^4 + 4*a*b*cos(d* 
x + c)^2 + 8*a*b)*sin(d*x + c))/d
 
3.13.17.6 Sympy [F(-1)]

Timed out. \[ \int \cos ^4(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\text {Timed out} \]

input
integrate(cos(d*x+c)**5*csc(d*x+c)*(a+b*sin(d*x+c))**2,x)
 
output
Timed out
 
3.13.17.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.81 \[ \int \cos ^4(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {10 \, b^{2} \sin \left (d x + c\right )^{6} + 24 \, a b \sin \left (d x + c\right )^{5} - 80 \, a b \sin \left (d x + c\right )^{3} + 15 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )^{4} + 60 \, a^{2} \log \left (\sin \left (d x + c\right )\right ) + 120 \, a b \sin \left (d x + c\right ) - 30 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2}}{60 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)*(a+b*sin(d*x+c))^2,x, algorithm="maxima" 
)
 
output
1/60*(10*b^2*sin(d*x + c)^6 + 24*a*b*sin(d*x + c)^5 - 80*a*b*sin(d*x + c)^ 
3 + 15*(a^2 - 2*b^2)*sin(d*x + c)^4 + 60*a^2*log(sin(d*x + c)) + 120*a*b*s 
in(d*x + c) - 30*(2*a^2 - b^2)*sin(d*x + c)^2)/d
 
3.13.17.8 Giac [A] (verification not implemented)

Time = 0.39 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.91 \[ \int \cos ^4(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {10 \, b^{2} \sin \left (d x + c\right )^{6} + 24 \, a b \sin \left (d x + c\right )^{5} + 15 \, a^{2} \sin \left (d x + c\right )^{4} - 30 \, b^{2} \sin \left (d x + c\right )^{4} - 80 \, a b \sin \left (d x + c\right )^{3} - 60 \, a^{2} \sin \left (d x + c\right )^{2} + 30 \, b^{2} \sin \left (d x + c\right )^{2} + 60 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + 120 \, a b \sin \left (d x + c\right )}{60 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)*(a+b*sin(d*x+c))^2,x, algorithm="giac")
 
output
1/60*(10*b^2*sin(d*x + c)^6 + 24*a*b*sin(d*x + c)^5 + 15*a^2*sin(d*x + c)^ 
4 - 30*b^2*sin(d*x + c)^4 - 80*a*b*sin(d*x + c)^3 - 60*a^2*sin(d*x + c)^2 
+ 30*b^2*sin(d*x + c)^2 + 60*a^2*log(abs(sin(d*x + c))) + 120*a*b*sin(d*x 
+ c))/d
 
3.13.17.9 Mupad [B] (verification not implemented)

Time = 11.62 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.18 \[ \int \cos ^4(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {a^2\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {a^2\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{d}+\frac {a^2\,{\cos \left (c+d\,x\right )}^2}{2\,d}+\frac {a^2\,{\cos \left (c+d\,x\right )}^4}{4\,d}-\frac {b^2\,{\cos \left (c+d\,x\right )}^6}{6\,d}+\frac {16\,a\,b\,\sin \left (c+d\,x\right )}{15\,d}+\frac {8\,a\,b\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{15\,d}+\frac {2\,a\,b\,{\cos \left (c+d\,x\right )}^4\,\sin \left (c+d\,x\right )}{5\,d} \]

input
int((cos(c + d*x)^5*(a + b*sin(c + d*x))^2)/sin(c + d*x),x)
 
output
(a^2*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d - (a^2*log(1/cos(c/2 + 
(d*x)/2)^2))/d + (a^2*cos(c + d*x)^2)/(2*d) + (a^2*cos(c + d*x)^4)/(4*d) - 
 (b^2*cos(c + d*x)^6)/(6*d) + (16*a*b*sin(c + d*x))/(15*d) + (8*a*b*cos(c 
+ d*x)^2*sin(c + d*x))/(15*d) + (2*a*b*cos(c + d*x)^4*sin(c + d*x))/(5*d)